package com.asd.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author
 * @createtime 2021-09-13 14:19
 * @description
 */
@Data
@ApiModel(value = "user对象", description = "用户实体")
@TableName("user")
public class User {

    @TableId(type = IdType.ID_WORKER_STR) //mp自带策略，生成19位数值,字符串
    @ApiModelProperty(value = "id")
    private String id;
    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "用户登录名(手机号)")
    private String userName;
    @ApiModelProperty(value = "用户登录密码")
    private String passWord;
    @ApiModelProperty(value = "账号是否启用(0:冻结,1:启用)")
    private String isEnable;
    @ApiModelProperty(value = "组织id")
    private String orgId;
    @ApiModelProperty(value = "角色id")
    private String roleId;
    @ApiModelProperty(value = "所属应用id集合:[id1,id2,id3]")
    private String dataApp;
    @ApiModelProperty(value = "所属数据源集合:[id1,id2,id3]")
    private String dataInf;
    @ApiModelProperty(value = "备注")
    private String note;
    /**
     * md5密码盐
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String salt;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date create_time;


}
